import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { setupSwagger } from './config/swagger';
import { appUse } from '@/use';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  // 注册use
  appUse(app);
  // 设置swagger
  setupSwagger(app);
  app.enableCors();
  await app.listen(3000);
}
bootstrap();
